#CFLAGS:= -O3 -g -Wall -Werror
CFLAGS:= -ofast -g -Wall -Werror --std=c++11

all: first template vector1 vector2 vector vector4 deque list1 list2 list3 set1 set2 map hash thread sort1 sort2 bitset1 bitset2 bst avl

first: first.cpp
	g++ $(CFLAGS) -o $@ $+ 

template: template.cpp
	g++ $(CFLAGS) -o $@ $+ 

vector1: vector1.cpp
	g++ $(CFLAGS) -o $@ $+ 

vector2: vector2.cpp
	g++ $(CFLAGS) -o $@ $+ 

vector3: vector3.cpp
	g++ $(CFLAGS) -o $@ $+ 

vector4: vector4.cpp
	g++ $(CFLAGS) -o $@ $+ 

deque: deque.cpp
	g++ $(CFLAGS) -o $@ $+ 

list1: list1.cpp
	g++ $(CFLAGS) -o $@ $+ 

list2: list2.cpp
	g++ $(CFLAGS) -o $@ $+ 

list3: list3.cpp
	g++ $(CFLAGS) -o $@ $+ 

set1: set1.cpp
	g++ $(CFLAGS) -o $@ $+ 

set2: set2.cpp
	g++ $(CFLAGS) -o $@ $+ 

map: map.cpp
	g++ $(CFLAGS) -o $@ $+ 

hash: hash.cpp
	g++ $(CFLAGS) -o $@ $+ 

thread: thread.cpp
	g++ $(CFLAGS) -o $@ $+  -lpthread

sort1: sort1.cpp
	g++ $(CFLAGS) -o $@ $+ 

sort2: sort2.cpp
	g++ $(CFLAGS) -o $@ $+  

bitset1: bitset1.cpp
	g++ $(CFLAGS) -o $@ $+  

bitset2: bitset2.cpp
	g++ $(CFLAGS) -o $@ $+  

bst: bst.cpp
	g++ $(CFLAGS) -o $@ $+  

avl: avl.cpp
	g++ $(CFLAGS) -o $@ $+  

clean:
	rm -f a.out 
	rm -f first template vector1 vector2 vector3 vector4 deque list1 list2 list3 set1 set2 map hash thread sort1 sort2 bitset1 bitset2 bst avl
